package com.dcits.electronic_account.controller;

import com.dcits.electronic_account.bean.RequestFlow;
import com.dcits.electronic_account.bean.ResponseJson;
import com.dcits.electronic_account.dto.FlowDto;
import com.dcits.electronic_account.service.FlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: 张志伟
 * @Date： 2022/6/25
 */
@Controller
@RequestMapping("/flow")
public class FlowController {

    @Autowired
    private FlowService flowService;

    @PostMapping("/queryByList")
    @ResponseBody
    public ResponseJson<List<FlowDto>> queryFlow(@RequestBody RequestFlow requestFlow){
        return flowService.queryFlowByList(requestFlow);
    }
}
